<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    console.log(new Date());//Wed Jul 07 2021 09:51:24 GMT+0800 (中国标准时间)
    console.log(new Date().toDateString());//Wed Jul 07 2021
    console.log(new Date().toTimeString());//09:52:02 GMT+0800 (中国标准时间)
    </script>
</body>
</html>